local thbattle__yaomeng_cijing = fk.CreateSkill {

  name = "thbattle__yaomeng_cijing",

  tags = { Skill.Compulsory, },

}



---@type TrigSkelSpec<AimFunc>
local thbattle__yaomeng_cijing_spec = {
  on_use = function(self, event, target, player, data)
    local to = (event == fk.TargetConfirmed and data.card.trueName == "duel") and data.from or data.to
    data:setResponseTimes(2, to)
  end,
}

thbattle__yaomeng_cijing:addEffect(fk.TargetSpecified, {
  anim_type = "offensive",
  can_trigger = function(self, event, target, player, data)
    return target == player and player:hasSkill(thbattle__yaomeng_cijing.name) and
      table.contains({ "slash", "duel" }, data.card.trueName)
  end,
  on_use = thbattle__yaomeng_cijing_spec.on_use
})

thbattle__yaomeng_cijing:addEffect(fk.TargetConfirmed, {
  anim_type = "offensive",
  can_trigger = function(self, event, target, player, data)
    return target == player and player:hasSkill(thbattle__yaomeng_cijing.name) and data.card.trueName == "duel"
  end,
  on_use = thbattle__yaomeng_cijing_spec.on_use
})



return thbattle__yaomeng_cijing
